package com.anycl.design.principle.lsp;

public class Person {

    private AbstractAnimal animal;

    public void feed(AbstractAnimal animal) {
        this.animal = animal;
    }

    public void walkAnimal() {
        System.out.println("人开始溜动物");
        animal.dance();
    }
}
